﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WSPay.Common.Data;

namespace WSPay.Domain
{
    public class WSBAccount : IEntity
    {

        public WSBAccount()
        {

        }

        public WSBAccount(Guid userID,string userName)
        {
            UserID = userID;
            UserName = userName;
            CreateTime = DateTime.Now;
            LastUpdateTime = DateTime.Now;
            IsActive = true;
            IsSystemAccount = false;
        }

        public int ID
        {
            get;
            set;
        }

        /// <summary>
        /// 所属用户ID
        /// </summary>
        public Guid UserID { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 账户总金额
        /// </summary>
        public decimal Ammount { get; set; }

        /// <summary>
        /// 账户可用金额
        /// </summary>
        public decimal CashAmmount { get; set; }

        /// <summary>
        /// 账户冻结金额
        /// </summary>
        public decimal LockAmmount { get; set; }

        /// <summary>
        /// 账户是否激活
        /// </summary>
        public bool IsActive { get; set; }

        /// <summary>
        /// 是否是系统账户
        /// </summary>
        public bool IsSystemAccount { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 最后更新日期
        /// </summary>
        public DateTime LastUpdateTime { get; set; }

        /// <summary>
        /// 乐观锁
        /// </summary>
        public byte[] RowVersion { get; set; }

    }

    public class SystemWSBAccount {
        public Guid UserID { get; set; }

        public string UserName { get; set; }

        public static readonly SystemWSBAccount WSTD = new SystemWSBAccount() {UserID = new Guid("88888888-8888-8888-8888-888888888888"),UserName = "WSTD机构账户"};
    }
}
